.elements {
    max-width: 880px;
    margin: 50px auto 66px;
    display: grid;
    grid-template-columns: repeat(auto-fit, 282px);
    column-gap: 17px;
    row-gap: 15px;
}

@media screen and (max-width: 895px) {
    .elements {
        max-width: 581px;
        margin: 36px auto 48px;
    }
}

@media screen and (max-width: 596px) {
    .elements {
        max-width: 282px;
    }
}
